package cn.exrick.xboot.modules.your.dao.mapper;

import cn.exrick.xboot.modules.your.entity.Malfunction;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 陪护床数据处理层
 * @author chenyunxuan
 */
public interface MalfunctionMapper extends BaseMapper<Malfunction> {
    @Select("select a.*,b.mobile,c.bed_code from es_malfunction a left join es_user b on a.user_id = b.id left join es_bed_order c on a.order_id=c.id ${ew.customSqlSegment}")
    IPage<Malfunction> malfunctionPage(Page initMpPage, @Param(Constants.WRAPPER)QueryWrapper<Malfunction> qw);
}